<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

        <form th:action="@{/add}" method="post">
            账号：  <input type="text" name="username"><br>
             密码： <input type="text" name="password"><br>
              性别：<input type="radio" name="sex" value="0">男
              <input type="radio" name="sex" value="1">女<br>
              <span th:each="role : ${roles}">
                   <input type="checkbox" name="role" th:value="${role.id}">
                   <span th:text="${role.rname}"></span>
              </span>
            <input type="submit" value="add">
        </form>
</body>
</html>